package me.chenjp.tracker.service;

/**
 * @author: Chenjp
 * @description: 这个人很懒, 没有留下任何注释
 * @create: 2019-05-03 13:05
 */
public interface JwtService {
    /**
     * Create jwt string.
     *
     * @param uid  the uid
     * @param role 角色：ADMIN/MEMBER...
     * @return the string
     */
    String createJwt(Integer uid, String role, String name);

    /**
     * Remove token from jwt cache.
     *
     * @param uid the uid
     */
    void removeTokenFromJwtCache(Integer uid);

    /**
     * Gets uid.
     *
     * @param token the token
     * @return the uid
     */
    Integer getUid(String token);

    /**
     * Verify.
     *
     * @param token the token
     */
    void verify(String token);

    /**
     * Gets info status.
     *
     * @param token the token
     * @return the info status
     */
    String getUserRole(String token);

    String getName(String token);
}

